#pragma once

#include "e2d/core/Component.h"
#include "e2d/core/EntityMap.h"
#include "fxcc/core/MetaCache.h"

namespace e2d
{
	struct AnimationClip : public e2d::Component
	{
		FXCC_DEFINE_COMPONENT_LABEL(AnimationClip);

		e2d::AnimationNode m_AnimationNode;

		void OnLoad() override;

		void OnStart() override;

		void OnUpdate() override;

		void OnUpdateRuntime() override;

		void OnDestroy() override;

		float AnimAxis();

		bool InitAnimNode(e2d::Entity* entity);

		bool ProcessAnimNode(e2d::Entity* entity, e2d::Animation* anim);

	private:

		void OnMove();



	};
};